package com.chookss.tiku

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import com.chookss.tiku.entity.LiveResult
import com.chookss.tools.Utils

/**
 * Company:
 * Project:
 * Author: liuhaoge
 * Date: 2020/12/23 16:15
 * Note: 模拟试卷数据类
 */
class SimulateTestViewModel : AnswerExamViewModel() {

    override fun getExamCountDown(examTimeLength: String): LiveData<LiveResult<Long>> {
        var liveResult = MutableLiveData<LiveResult<Long>>()
        if(Utils.isNull(examTimeLength)){
            liveResult.postValue(LiveResult(0))
        }else{
            liveResult.postValue(LiveResult(examTimeLength.toLong() * 60))
        }

        return liveResult
    }

}